//
//  PhotoView.h
//  OrderSeat
//
//  Created by 王威 on 13-12-11.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TMQuiltView.h"
#import "TMPhotoQuiltViewCell.h"
#import "EGORefreshTableHeaderView.h"
#import "EGORefreshTableFooterView.h"

@class PhotoViewDataSource;
@class PhotoViewController;
@interface PhotoView : UIView<TMQuiltViewDataSource,TMQuiltViewDelegate,EGORefreshTableDelegate,TMPhotoQuiltViewCellDelegate>
{
	//EGOHeader
    EGORefreshTableHeaderView *_refreshHeaderView;
    //EGOFoot
    EGORefreshTableFooterView *_refreshFooterView;
}

@property (assign, nonatomic) int type;
@property (assign, nonatomic) BOOL isUserCenter;
@property (assign, nonatomic) BOOL reloading;
@property (copy  , nonatomic) NSString *shopId;
@property (copy  , nonatomic) NSString *userName;
@property (strong, nonatomic) TMQuiltView *qtmquitView;
@property (strong, nonatomic) BaseViewController *photoVC;
@property (strong, nonatomic) PhotoViewDataSource *dataSource;
@property (strong, nonatomic) NSDictionary *selectRow;

- (id)initWithFrame:(CGRect)frame shopId:(NSString*)shopId type:(int)type;
- (id)initWithFrame:(CGRect)frame userName:(NSString *)userName type:(int)type;
- (void)autoPullRefresh;

@end

@interface PhotoViewDataSource : BaseDataSource

@property (nonatomic, assign) int pageNumber;
@property (nonatomic, strong) NSMutableArray *photoList;
@property (nonatomic, strong) PhotoView *view;

- (id)initWithView:(id)view;
- (void)fetchPhotoWithPage:(int)page;
- (void)deletePhotoWithId:(NSString *)pid;

@end
